import { request } from '../../../services/request';

// 检查任务接口
export const checkTaskApi = async (workParam: string): Promise<any> => {
    console.log('=== 检查任务接口请求数据 ===');
    console.log('工单号:', workParam);
    console.log('======================');

    try {
        const response = await request('app/work/checkTask', {
            method: 'POST',
            body: JSON.stringify({ work_param: workParam }),
        });

        console.log('=== 检查任务接口返回数据 ===');
        console.log('响应数据:', response);
        console.log('======================');

        return response;
    } catch (error) {
        console.error('=== 检查任务接口调用失败 ===');
        console.error('错误信息:', error);
        console.error('======================');
        throw error;
    }
};
// 退出登录接口
export const logoutApi = async () => {
    const res = await request('/app/auth/logout', {
        method: 'POST',
    });
    // console.log('退出登录接口返回:', res);
    return res;
}; 